package com.itheima.test.test1.callable;

import java.util.concurrent.FutureTask;

public class CallableDemo {
    public static void main(String[] args) {
        //创建Callable对象
        MyCallable mc = new MyCallable();
        //创建Taskfutrue对象,将mc作为参数放进去
        FutureTask<String> ft = new FutureTask<>(mc);
        //再将ft作为参数放进Tread对象当中
        Thread t1 = new Thread(ft);
        t1.start();

    }

}
